package com.qixin.part.controller;


import com.qixin.api.bean.ComLicenseFile;
import com.qixin.api.bean.FileResult;

import com.qixin.api.service.ComLicenseFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 公用营业执照文件表 前端控制器
 * </p>
 *
 * @author 闫亚茹
 * @since 2018-10-29
 */
@Controller
@RequestMapping("/comLicenseFile")
public class ComLicenseFileController {
    /**
     * 文件上传
     * @return
     */
    @Autowired
    ComLicenseFileService comLicenseFileService;
    @RequestMapping("/upload")
    @ResponseBody
    public FileResult upload(@RequestParam("file") MultipartFile file) {
        ComLicenseFile comLicenseFileFile=new ComLicenseFile();
        return  comLicenseFileService.upload(file,comLicenseFileFile);
    }
}
